package com.example.loc_test13.Bean;

import org.springframework.stereotype.Component;

@Component
public class Bean {
    @org.springframework.context.annotation.Bean
    public User tbean1() {
        User user = new User();
        user.setAge(18);
        user.setID("1");
        user.setName("zhangsan");
        user.toString();
        return user;
    }
@org.springframework.context.annotation.Bean
    public User tbean2() {
        User user = new User();
        user.setAge(20);
        user.setID("2");
        user.setName("lisi");
        return user;
    }
}
